const express = require('express');
const router = express.Router();

router.get('/', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `${i + 1}`,
        brandName: 'string',
        marketDepartment: 'string',
        country: 'string',
        dealerCode: 'string',
        dealerName: 'string',
        manufacturerCode: 'string',
        manufacturerName: 'string',
        forecastYear: 2020,
        forecastMonth: 3,
        assembleMethod: 1,
        materialGroupKDBOMCode: 'string',
        referenceMaterialGroupKDBOMCode: 'string',
        modelCode: 'string',
        modelName: 'string',
        n1SalePlanQuantity: 1,
        n1ForecastOrderQuantity: 1,
        n1BeginningInventory: 1,
        n1EndingInventory: 1,
        n1OrderPlanQuantity: 1,
        n1TheoreticalStoreSaleRatio: 1,
        n1ActualStoreSaleRatio: 1,
        n2SalePlanQuantity: 1,
        n2ForecastOrderQuantity: 1,
        n2BeginningInventory: 1,
        n2EndingInventory: 1,
        n2OrderPlanQuantity: 1,
        n2TheoreticalStoreSaleRatio: 1,
        n2ActualStoreSaleRatio: 1,
        n3SalePlanQuantity: 1,
        n3ForecastOrderQuantity: 1,
        n3BeginningInventory: 1,
        n3EndingInventory: 1,
        n3OrderPlanQuantity: 1,
        n3TheoreticalStoreSaleRatio: 1,
        n3ActualStoreSaleRatio: 1,
        n4SalePlanQuantity: 1,
        n4ForecastOrderQuantity: 1,
        n4BeginningInventory: 1,
        n4EndingInventory: 1,
        n4OrderPlanQuantity: 1,
        n4TheoreticalStoreSaleRatio: 1,
        n4ActualStoreSaleRatio: 1,
        n5SalePlanQuantity: 1,
        n5ForecastOrderQuantity: 1,
        n5BeginningInventory: 1,
        n5EndingInventory: 1,
        n5OrderPlanQuantity: 1,
        n5TheoreticalStoreSaleRatio: 1,
        n5ActualStoreSaleRatio: 1,
        n6SalePlanQuantity: 1,
        n6ForecastOrderQuantity: 1,
        n6BeginningInventory: 1,
        n6EndingInventory: 1,
        n6OrderPlanQuantity: 1,
        n6TheoreticalStoreSaleRatio: 1,
        n6ActualStoreSaleRatio: 1,
        status: 1,
        remark: 'string',
        createTime: '2020-03-15T10:57:08.916Z'
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
            saleOrderForecastSummaryWay: 2,
        }
    });
});


router.get('/forSalePlanOrder', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        n2ForecastOrderQuantity: 2,
        n3ForecastOrderQuantity: 3,
        n4ForecastOrderQuantity: 4,
        n5ForecastOrderQuantity: 5,
        n6ForecastOrderQuantity: 6,
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
            saleOrderForecastSummaryWay: 2,
        }
    });
});
router.get('/:id/export', (req, res) => {
    res.json({
        message: '导出成功'
    });
});
module.exports = router;
